<template>
  <div @click="toLink">
    我是一级路由
  </div>
</template>
<script setup>
import { useRouter } from 'vue-router';
const router = useRouter()
const toLink = () => {
  router.push({
    name: 'secondLevel',
    params: {
      name: '111',
      age: 1231
    }
  })
}
</script>